/*
ok version
给定一个数，请将该数各个位上数字反转得到一个新数。
这次与NOIp2011普及组第一题不同的是：这个数可以是小数，分数，百分数，整数。整数反转是将所有数位对调；
小数反转是把整数部分的数反转，再将小数部分的数反转，不交换整数部分与小数部分；分数反转是把分母的数反转，
再把分子的数反转，不交换分子与分母；百分数的分子一定是整数，百分数只改变数字部分。整数新数也应满足整数的常见形式，
即除非给定的原数为零，否则反转后得到的新数的最高位数字不应为零；小数新数的末尾不为0（除非小数部分除了0没有别的数，
那么只保留1个0）；分数不约分，分子和分母都不是小数（约分滴童鞋抱歉了，不能过哦。输入数据保证分母不为0），本次没有负数。
*/
//AC 100!
#include <iostream>
#include <string>
using namespace std;

void reverse1(string &str, int m, int n)
{
    for (int i = m, j = n; i < j; i++, j--)
    {
        char temp = str[i];
        str[i] = str[j];
        str[j] = temp;
    }
}
void adjustment(string str1, string &str2, char fuhao, int b)
{
    int length2 = str1.length();
    if ((fuhao == 'z') || (fuhao == '%'))
    {
        
        for (int i = 0; i < length2; i++)
        {
            if (str1[0] == '0')
            {
                str1.erase(0, 1);
            }
        }
        str2 = str1;
    }
    else if (fuhao == '.')
    {
        for (int i = 0; i < length2; i++)
        {
            if (str1[0] == '0')
            {
                str1.erase(0, 1);
            }
        }
        for (int i = 0; i < length2; i++)
        {
            if (str1[(str1.length() - 1)] == '0')
            {
                str1.erase((str1.length() - 1), 1);
            }
        }
        str2 = str1;
    }
    else if (fuhao == '/')
    {
        for (int i = 0; i < length2; i++)
        {
            if (str1[(b + 1)] == '0')
            {
                str1.erase(b + 1, 1);
            }
        }
        for (int i = 0; i <length2; i++)
        {
            if (str1[0] == '0')
            {
                str1.erase(0, 1);
            }
        }

        str2 = str1;
    }
}
int main()
{
    int a = 20, b = 0;
    char fuhao = 'z';
    string str1, str2;
    cin >> str1;
    int length = str1.length();
    //cout << "数组长度：" << length << endl;
    for (int i = 0; i < length; i++)
    {
        if (str1[i] == '/')
        {
            b = i;
            fuhao = '/';
            int q = i;
            //cout << "运算符在数组中位置：" << i << endl;
            for (int i = 0; i < length; i++)
            {
                if (str1[(b + 1)] == '0')
                {
                    str1.erase(b + 1, 1);
                }
            }
            reverse1(str1, i + 1, str1.length() - 1);
            for (int i = 0; i < length; i++)
            {
                if (str1[0] == '0')
                {
                    str1.erase(0, 1);
                    q--;
                }
            }
            reverse1(str1, 0, q - 1);
            b = q;
            break;
        }
        else if (str1[i] == '.')
        {
            b = i;
            fuhao = '.';
            int q = i;
            //cout << "运算符在数组中位置：" << i << endl;
            for (int i = 0; i < length; i++)
            {
                if (str1[(str1.length() - 1)] == '0')
                {
                    str1.erase((str1.length() - 1), 1);
                }
            }
            reverse1(str1, i + 1, str1.length() - 1);
            for (int i = 0; i < length; i++)
            {
                if (str1[0] == '0')
                {
                    str1.erase(0, 1);
                    q--;
                }
            }
            reverse1(str1, 0, q - 1);
            //b = q;
            break;
        }
        else if (str1[i] == '%')
        {
            b = i;
            fuhao = '%';
            int q = i;
            //cout << "运算符在数组中位置：" << i << endl;
            int length2 = str1.length();
            for (int i = 0; i < length2; i++)
            {
                if (str1[0] == '0')
                {
                    str1.erase(0, 1);
                    q--;
                }
            }
            if (q == str1.length() - 1)
                reverse1(str1, 0, str1.length() - 2);
            break;
        }
        else
        {
        }
    }
    if (fuhao == 'z')
    {
        int length2 = str1.length();
        for (int i = 0; i <length2 ; i++)
        {
            if (str1[0] == '0')
            {
                str1.erase(0, 1);
            }
        }
        reverse1(str1, 0, str1.length() - 1);
    }
    //cout << str1 << endl;
    adjustment(str1, str2, fuhao, b);
    if (str2.empty())
    {
        cout << "0" << endl;
    }
    else if (str2[0] == '.')
    {
        if (str2[str2.length() - 1] == '.')
        {
            cout << "0" << str2 << "0" << endl;
        }
        else
        {
            cout << "0" << str2 << endl;
        }
    }
    else if (str2[0] == '/')
    {
        cout << "0" << str2 << endl;
    }
    else if (str2[0] == '%')
    {
        cout << "0" << str2 << endl;
    }
    else if (str2[str2.length() - 1] == '.')
    {
        cout << str2 << "0" << endl;
    }
    else
    {
        cout << str2 << endl;
    }

    return 0;
}
